<template>
	<view class="page">
		<view class="header">
			<view class="header-left" @click="goback()">
				<image src="../../static/left.png" mode=""></image>
			</view>
			<view class="header-content">
				购物车
			</view>
			<view class="header-right">

			</view>
		</view>
		<view class="uni-list">
			<checkbox-group @change="checkboxChange">
				<label class="uni-list-cell uni-list-cell-pd" v-for="item in items" :key="item.value">
					<view>
						<checkbox :value="item.value" :checked="item.checked" />
					</view>
					<view class="list-item">
						<view class="carimg">
							<image src="../../static/shop.png" mode=""></image>
						</view>
						<view class="carRight">
							<view>碧波币</view>
							<view class="car-price">
								<view> 9. 99NYC</view>
								<view class="numberBbox">
									<number-box></number-box>
								</view>
							</view>
						</view>
					</view>
				</label>
			</checkbox-group>

		</view>
		<view class="fix">
			<view class="fixLeft">
				<label class="checkbox">
					<checkbox value="cb" checked="true" />全选
				</label>
			</view>
			<view class="fixright">
				<view class="fixnum">总计：
					<span>5.3346 NYC</span>
				</view>
				<view class="fixbtn" @click="gopay">
					结算
				</view>
			</view>
		</view>
	</view>
</template>
<script>
	import numberBox from '../../components/number-box.vue'
	export default {
		data() {
			return {
				title: 'radio',
				items: [{
						value: 'USA',
						name: '美国',
						checked: 'false'
					},
					{
						value: 'CHN',
						name: '中国',
						checked: 'false'
					}
				]
			}
		},
		components: {
			numberBox
		},
		methods: {
			goback: function () {
				uni.navigateBack({
					delta: 1,
				})
			},
			gopay() {
				uni.navigateTo({
					url: 'zhuanhuanchenggong'
				})
			}

		}
	}
</script>

<style>
	.page {
		background: #FFFFFF;
		width: 100%;
		height: 100vh;
	}

	.header {
		height: 100px;
		width: 100%;
		display: flex;
		align-items: center;
		background: #FFFFFF;
	}

	.header-left,
	.header-right {
		width: 100px;
		height: 100px;

		display: flex;
		align-items: center;
		justify-content: center;
	}

	.header image {
		width: 40px;
		height: 40px;
	}

	.header-content {
		flex: 1;
		text-align: center;
	}

	.uni-list-cell-pd {
		display: flex;
		height: 200px;
		align-items: center;
		margin-bottom: 60px;
		padding-right: 40px;
		box-sizing: border-box;
	}

	.list-item {
		flex: 1;
		height: 200px;
		border: 2px solid #EEEEEE;
		display: flex;
		overflow: hidden;
	}

	.carimg {
		height: 200px;
		width: 200px;
		box-sizing: border-box;
		padding: 20px;
	}

	.carimg image {
		width: 100%;
		height: 100%;
	}

	.carRight {
		flex: 1;
		height: 200px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		box-sizing: border-box;
		padding: 30px 0;
	}

	.numberBbox {
		margin-right: 40px;
	}

	.car-price {
		display: flex;
		height: 80px;
		align-items: center;
		justify-content: space-between;
	}

	.fix {
		width: 750px;
		height: 100px;
		position: fixed;
		bottom: 0;
		left: 0;
		right: 0;
		background-color: #FFFFFF;
		border: 2px solid #EEEEEE;
		display: flex;
		align-items: center;
		justify-content: space-between;
	}

	.fix label {
		font-size: 20px;
		color: #b6b6b6;
	}

	.fixLeft {
		flex: 1;
	}

	.fixright {
		display: flex;
	}

	.fixnum {
		line-height: 100px;
	}

	.fixnum span {
		color: #e16465;
	}

	.fixbtn {
		margin-left: 20px;
		width: 140px;
		height: 100px;
		background-color: #e97b78;
		line-height: 100px;
		color: #FFFFFF;
		text-align: center;
	}
</style>
